﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:local="clr-namespace:Aggregator" 
    x:Class="Aggregator.MainPage" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="696" 
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait" shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="{StaticResource AppBackground}">
    	<VisualStateManager.VisualStateGroups>
    		<VisualStateGroup x:Name="VisualStateGroup">
    			<VisualStateGroup.Transitions>
    				<VisualTransition GeneratedDuration="0:0:1"/>
    			</VisualStateGroup.Transitions>
    			<VisualState x:Name="Loadedd">
    				<Storyboard>
    					<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainPivot" d:IsOptimized="True"/>
    					<DoubleAnimation Duration="0" To="-15" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="image" d:IsOptimized="True"/>
    					<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="image" d:IsOptimized="True"/>
    				</Storyboard>
    			</VisualState>
    			<VisualState x:Name="Loading">
    				<Storyboard>
    					<DoubleAnimation Duration="0" To="120" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="image" d:IsOptimized="True"/>
    					<DoubleAnimation Duration="0" To="313" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="image" d:IsOptimized="True"/>
    					<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="MainPivot" d:IsOptimized="True"/>
    				</Storyboard>
    			</VisualState>
    		</VisualStateGroup>
    	</VisualStateManager.VisualStateGroups>
        <!--Pivot Control-->
        <controls:Pivot x:Name="MainPivot" Title="" Foreground="#FF004563" Background="Transparent" Margin="0,56,0,0" Opacity="0">
            <!--Pivot item one-->
 
            <!--Pivot item two-->
        </controls:Pivot>
        <Image x:Name="image" HorizontalAlignment="Left" Height="44" Source="logo.png" Stretch="Fill" VerticalAlignment="Top" Width="228" Margin="37,12,0,0" RenderTransformOrigin="0.5,0.5">
        	<Image.RenderTransform>
        		<CompositeTransform TranslateX="120" TranslateY="313"/>
        	</Image.RenderTransform>
        </Image>
        <Grid x:Name="LoadBar" Height="32" VerticalAlignment="Top" Visibility="Collapsed">
        	<ProgressBar Height="10" VerticalAlignment="Top" IsIndeterminate="True" Foreground="Black" Background="Black"/>
        	<StackPanel HorizontalAlignment="Right" Margin="0,5,3,0" Orientation="Horizontal" d:LayoutOverrides="Height">
        		<TextBlock x:Name="LoadText_Left" TextWrapping="Wrap" Text="1" d:LayoutOverrides="Width" Foreground="Black"/>
        		<TextBlock TextWrapping="Wrap" Text="/" d:LayoutOverrides="Width" Foreground="Black"/>
        		<TextBlock x:Name="LoadText_Right" TextWrapping="Wrap" Text="13" d:LayoutOverrides="Width" Foreground="Black"/>
        	</StackPanel>
        </Grid>
        <Rectangle Fill="Black" Stroke="Black" Opacity="0.1" RenderTransformOrigin="0.5,0.5" IsHitTestVisible="False">
        	<Rectangle.RenderTransform>
        		<CompositeTransform x:Name="InitialLoadTransform" ScaleX="1"/>
        	</Rectangle.RenderTransform>
        </Rectangle>
    </Grid>
 
    <!--Sample code showing usage of ApplicationBar-->
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar x:Name="AppBar" IsVisible="True" IsMenuEnabled="True" Opacity="0.5">
            <shell:ApplicationBarIconButton Click="Refresh_Click" IconUri="/refresh.png" Text="Refresh"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>